home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgets / palette.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.2 KB  |  48 lines

  1. // $Id: palette.h 1.2 1997/07/14 04:27:16 dlorre Exp dlorre $
  2. #ifndef CLASS_PALETTE_H
  3. #define CLASS_PALETTE_H
  4.  
  5. #ifndef EXEC_TYPES_H
  6. #include <exec/types.h>
  7. #endif
  8.  
  9. #ifndef LIBRARIES_GADTOOLS_H
  10. #define PLACETEXT_LEFT  0x0001  /* Right-align text on left side */
  11. #endif
  12.  
  13. #ifndef CLASS_WINDOW_H
  14. class window ;
  15. #endif
  16.  
  17. #ifndef CLASS_GADGETLIST_H
  18. class gadgetlist ;
  19. #endif
  20.  
  21. #ifndef CLASS_GADGET_H
  22. #include "gadgets/gadget.h"
  23. #endif
  24.  
  25. // ========================================================================
  26. // ===========================  PALETTE CLASS =============================
  27. // ========================================================================
  28.  
  29. class palette : public gadget
  30. {
  31.     long numcolors ;
  32. public:
  33.     long cursel ;
  34.     palette(gadgetlist *gl,
  35.                 void (window::*func)(gadget *, unsigned long, unsigned short),
  36.                 const char *text,
  37.                 long depth,
  38.                 long offset,
  39.                 long pen,
  40.                 long place=PLACETEXT_LEFT,
  41.                 short iwidth=20, short iheight=10) ;
  42.     void set(long sel) ;
  43.     void action(unsigned long classe, unsigned short code) ;
  44.     void keystroke(BOOL shifted) ;
  45. };
  46.  
  47. #endif
  48.